﻿using System.Windows;
using System.Windows.Controls;
using UniversalEditor.Base.Mvvm;

namespace UniversalEditor.Base.StatusBarItems
{
	public abstract class StatusItemBase : ViewModelBase
	{
		private StatusItemPlacement _horizontalAlignment;

		private double _width = double.NaN;
		private double _minWidth = double.NaN;

		public StatusItemPlacement HorizontalAlignment
		{
			get { return _horizontalAlignment; }
			set
			{
				if (_horizontalAlignment == value)
					return;

				_horizontalAlignment = value;
				RaisePropertyChanged("HorizontalAlignment");
			}
		}

		public double Width
		{
			get { return _width; }
			set
			{
				if (_width == value)
					return;

				_width = value;
				RaisePropertyChanged("Width");
			}
		}

		public double MinWidth
		{
			get { return _minWidth; }
			set
			{
				if (_minWidth == value)
					return;

				_minWidth = value;
				RaisePropertyChanged("MinWidth");
			}
		}
	}

	public enum StatusItemPlacement
	{
		Left, Right
	}
}
